﻿
Imports System.Data
Imports VSModel
Imports Cls_Common
Partial Class FrontEnd_Page_Store_Edit
    Inherits System.Web.UI.Page


    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        Using _data As New VSEntities
            'check if user VIP3 and has Salon
            Dim _UserId As Integer = Session("UserId")
            Dim p = (From q In _data.Stores Where q.UserId = _UserId And q.StatusId = 3 Select q.StoreId).Count
            If p > 0 Then
                Session("StoreId") = p
            Else
                Excute_Javascript("Alertbox('Tài khoản của bạn phải là VIP 3 ');window.location ='nang-cap-vip.html';", Me.Page, True)
            End If
        End Using
    End Sub
End Class
